package com.example.chat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.chat.beans.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper extends BaseMapper<Admin> {
    String selectNameById(@Param("id") Integer id);
    String selectPhoneById(@Param("id") Integer id);
    Admin selectByUsername(@Param("username") String username);
    Admin selectOneByAdminId(@Param("adminId") Integer adminId);
    Admin selectOneById(@Param("id")Integer id);

    IPage<Admin> selectBySearchAdmin(Page<Admin> pages,
                                     @Param("tel") String tel,
                                     @Param("type") int type);

    List<Admin> allAdmin();
}
